// All source files and native code may not be transmitted, reproduced, distributed, 
// or commercially exploited in any way without the express written consent of Sybex Inc.

//MOST THINGS THAT CHANGE

//CHAPTER TITLE
var TestChapter:String = "Chapter 2";

var user_Correct:Array = new Array("DE","D","C","ACD","BC","BE","B","B","C","A","B","AC","B","AB","ABD","B","A","B","C","AB");

total = user_Correct.length;
_root.countdown = false;
// set to false to make the timer count up //
_root.hour = 0;
// number of hours at start//
_root.minute = 0;
// number of minutes at start//
//DON'T FORGET THE QUESTIONS AT THE END
//END OF MOST THINGS THAT CHANGE
//
//
//The following is used in the timer mc for adjusting the clock.
_root.delay = false;
_root.wait = 60;
//wait in seconds
_root.lastTime = Math.floor(getTimer()/1000);
i = 1;
totalCorrect = 0;
totalWrong = 0;
QCounter.QTotal.text = total;
Test_Title.text = TestChapter;
var finalCorrect:Number;
var userResponse:Array = new Array(total);
var markResponse:Array = new Array(total);
user_responseA = "";
user_responseB = "";
user_responseC = "";
user_responseD = "";
user_responseE = "";
user_responseF = "";
user_responseG = "";
user_responseH = "";
user_responseI = "";
user_responseJ = "";
user_responseK = "";
user_responseL = "";
user_responseM = "";
user_responseN = "";
_root.review = false;

function initialize() {
	_root.review = false;
	for (j=0; j<total; j++) {
		userResponse[j] = "";
		markResponse[j] = "";
	}
	
}

function showMatch() {
	set("user_response"+i, user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN);
	userResponse[i-1] = user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN;
}

// display multiple choice user_response answer function
function display() {
	set("user_response"+i, user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN);
	userResponse[i-1] = user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN;

	//**NEW
	response.text = userResponse[i-1];
	
}

//radio button function
function answer(choice) {
	set("user_response"+i, choice);
	userResponse[i-1] = choice;
	
	//**NEW
	response.text = userResponse[i-1];	
}

// marker button fuction
function mark(choice) {
	_root["mark"+i] = choice;
	markResponse[i-1] = choice;
}

// display fill in the blank by user.
function submit(userInput) {
	_root["user_response"+i] = userInput;
}

function reset() {
	_root["user_response"+i] = "";
}

function UnloadReview() {
	//ReviewLinks.unloadMovie();
}


function LayoutQuestion() {

	qname = "q"+(_root._currentframe-1);
	
	markname = "m"+(_root._currentframe-1);
	
	_root.loadQuestion(_root._currentframe-1);	
	
	_root.createEmptyMovieClip("container", 1);

	_root.attachMovie("Marker_mc", markname, 2, {_x:65.4, _y:55.4});
	
	if (_root.question_type == "2R") { this.attachMovie("2R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "3R") { this.attachMovie("3R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "3MC") { this.attachMovie("3MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "4R") { this.attachMovie("4R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "4MC") { this.attachMovie("4MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "5R") { this.attachMovie("5R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "5MC") { this.attachMovie("5MC", qname, 1, {_x:24, _y:165}); }	
	if (_root.question_type == "6R") { this.attachMovie("6R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "6MC") { this.attachMovie("6MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "7R") { this.attachMovie("7R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "7MC") { this.attachMovie("7MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "8R") { this.attachMovie("8R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "8MC") { this.attachMovie("8MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "9R") { this.attachMovie("9R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "9MC") { this.attachMovie("9MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "10R") { this.attachMovie("10R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "10MC") { this.attachMovie("10MC", qname, 1, {_x:24, _y:165}); }


	if (_root.review == false) { _root.attachMovie("show_answer", "show_answer1", 3, {_x:72, _y:418}); }
	if (_root.review == true)  { _root.attachMovie("show_review", "show_review1", 3, {_x:72, _y:418}); }
        if (_root.figure_flag == "True") { _root.attachMovie("show_figure", "show_figure1", 6, {_x:72, _y:418}); }
        if (_root.figure_flag == "False") { _root.createEmptyMovieClip("container", 6); }        

	question_scroll._visible = (question_text.maxscroll > 1);
	question_scroll.setSize(85,16); 
	
	//**NEW
	response.text = userResponse[i-1];
}

function loadQuestion(inNum:Number) {
	var cur:Number = inNum;
	//This corrects for the first frame holding all functions
	//QUESTIONS AND ANSWERS CAN ACCEPT HTML FORMATTING!!!
	//EACH QUESTION SHOULD BE FORMATTED SIMILAR TO THE FOLLOWING.

	switch (cur) {
case 1 :
_root.question = "Wireless LANs function at which of the following layers of the OSI model? (Choose 2.)";
_root.answerA = "Layer 5";
_root.answerB = "Layer 4";
_root.answerC = "Layer 3";
_root.answerD = "Layer 2";
_root.answerE = "Layer 1";
_root.correct = "DE";
_root.explanation = "Wireless LAN technology functions at Layer 1 and Layer 2 of the OSI model.";
_root.figure_flag = "False";
_root.question_type = "5MC";
break;

case 2 :
_root.question = "In computer network terminology, the definition of half duplex is closest to which of the following?";
_root.answerA = "One-way communication one way only";
_root.answerB = "One-way communication one way at a time";
_root.answerC = "Two-way communication both directions simultaneously";
_root.answerD = "Two-way communication one way at a time";
_root.correct = "D";
_root.explanation = "In computer terminology, half duplex is two-way communication but only one way at a time. Full duplex is two-way communication in both directions simultaneously.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 3 :
_root.question = "A self-contained intelligent access point is:";
_root.answerA = "Lightweight";
_root.answerB =	"Heavyweight";
_root.answerC = "Autonomous";
_root.answerD = "Thin";
_root.correct = "C";
_root.explanation = "An autonomous access point is an intelligent, self-contained network infrastructure device. Lightweight access points (also called thin access points) work with a wireless LAN controller/switch.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 4 :
_root.question = "SOHO access points have which of the following features? (Choose 3.)";
_root.answerA = "WPA 2.0 support";
_root.answerB = "CLI configuration";
_root.answerC = "Static output power";
_root.answerD = "Wi-Fi certifications";
_root.correct = "ACD";
_root.explanation = "A, C, and D are correct. SOHO access points typically are managed from a web browser and do not have a command-line interface feature.";
_root.figure_flag = "False";
_root.question_type = "4MC";
break;

case 5 :
_root.question = "Wireless bridges must be configured with ________ and ________. (Choose 2.)";
_root.answerA = "Null SSID";
_root.answerB = "Same SSID";
_root.answerC = "Same RF channel";
_root.answerD = "Channel scanning";
_root.answerE = "Wired Equivalent Privacy";
_root.correct = "BC";
_root.explanation = "Bridges must be on the same RF channel and have the same SSID in order to communicate.";
_root.figure_flag = "False";
_root.question_type = "5MC";
break;

case 6 :
_root.question = "Which of the following is a benefit of a wireless repeater? (Choose 2.)";
_root.answerA = "Higher data transfer rate";
_root.answerB = "Larger cell size allows for more devices to access the medium";
_root.answerC = "Smaller cell size allows for less devices to access the medium";
_root.answerD = "Less data throughput";
_root.answerE = "Extends cell size";
_root.correct = "BE";
_root.explanation = "Wireless repeaters do extend the cell size and will potentially allow more users to connect. However, using a wireless repeater will decrease throughput.";
_root.figure_flag = "False";
_root.question_type = "5MC";
break;

case 7 :
_root.question = "True or false: A benefit of a wireless LAN controller/switch is distributed administration.";
_root.answerA = "True";
_root.answerB = "False";
_root.correct = "B";
_root.explanation = "A wireless LAN controller/switch uses centralized administration, not distributed administration.";
_root.figure_flag = "False";
_root.question_type = "2R";
break;

case 8 :
_root.question = "Static output transmit power of a SOHO access points is typically:";
_root.answerA = "32dBm";
_root.answerB = "15dBm";
_root.answerC = "23mW";
_root.answerD = "15mW";
_root.correct = "B";
_root.explanation = "Many SOHO access points use 15dBm or 32mW for transmit output power.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 9 :
_root.question = "The 802.3-2005 Clause 33 standard specifies ______________________ VDC as the nominal voltage.";
_root.answerA = "32";
_root.answerB = "57";
_root.answerC = "48";
_root.answerD = "12";
_root.correct = "C";
_root.explanation = "The PoE standard specifies 48 VDC as nominal. The range is 44&#8212;57 VDC.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 10 :
_root.question = "Which of the following devices is an in-line device that will inject DC voltage into the Ethernet cable?";
_root.answerA = "Midspan";
_root.answerB = "Midpoint";
_root.answerC = "Endspan";
_root.answerD = "Endpoint";
_root.correct = "A";
_root.explanation = "A midspan device will inject power into an Ethernet cable. Endpoint power is delivered directly from a switch or controller.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 11 :
_root.question = "Which layer of the OSI model is responsible for delivering data to a unique hardware address?";
_root.answerA = "Layer 1";
_root.answerB = "Layer 2";
_root.answerC = "Layer 3";
_root.answerD = "Layer 4";
_root.answerE = "Layer 5";
_root.answerF = "Layer 6";
_root.answerG = "Layer 7";
_root.correct = "B";
_root.explanation = "Layer 2 is the Data Link layer. A MAC address is a unique identifier of the network card.";
_root.figure_flag = "False";
_root.question_type = "7R";
break;

case 12 :
_root.question = "SOHO access points are typically configured by using _______. (Choose 2.)";
_root.answerA = "HTTP";
_root.answerB = "FTP";
_root.answerC = "HTTPS";
_root.answerD = "CLI";
_root.answerE = "SMTP";
_root.correct = "AC";
_root.explanation = "SOHO use HTTP or HTTPS for configuration. Enterprise can also use CLI. SMTP is Simple Mail Transfer Protocol.";
_root.figure_flag = "False";
_root.question_type = "5MC";
break;

case 13 :
_root.question = "True or false: An administrator should always configure an access point from the wireless network.";
_root.answerA = "True";
_root.answerB = "False";
_root.correct = "B";
_root.explanation = "An administrator should avoid configuring an access point from the wireless side of the network unless absolutely necessary.";
_root.figure_flag = "False";
_root.question_type = "2R";
break;

case 14 :
_root.question = "Access points (APs) work at which layers of the OSI model? (Choose 2.)";
_root.answerA = "Layer 1";
_root.answerB = "Layer 2";
_root.answerC = "Layer 3";
_root.answerD = "Layer 4";
_root.answerE = "Layer 5";
_root.answerF = "Layer 6";
_root.answerG = "Layer 7";
_root.correct = "AB";
_root.explanation = "Depending on the specific function, APs operate at Layers 1 and 2. Repeaters function only at Layer 1.";
_root.figure_flag = "False";
_root.question_type = "7MC";
break;

case 15 :
_root.question = "Enterprise access points may contain which of the following features? (Choose 3.)";
_root.answerA = "WPA 2.0 support";
_root.answerB = "RADIUS server";
_root.answerC = "Static output power";
_root.answerD = "Repeater mode";
_root.answerE = "Power sourcing equipment";
_root.correct = "ABD";
_root.explanation = "Enterprise access points have adjustable output power. Power sourcing equipment is used in PoE to deliver power and data.";
_root.figure_flag = "False";
_root.question_type = "5MC";
break;

case 16 :
_root.question = "Which of the following statements is true regarding a wireless LAN controller/switch?";
_root.answerA = "Virtual local area networks (VLANs) involve physical separation of ports.";
_root.answerB = "Virtual local area networks (VLANs) involve a logical separation of ports.";
_root.answerC = "Virtual local area network (VLAN) is another name for a repeater.";
_root.answerD = "Virtual local area networks (VLANs) require Power over Ethernet (PoE).";
_root.correct = "B";
_root.explanation = "VLANs involve logical separation of ports.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 17 :
_root.question = "A lightweight access point connected to a port on the wireless LAN controller/switch and not to an intermediate device is considered to have which of the following?";
_root.answerA = "Direct connectivity";
_root.answerB = "Distributed connectivity";
_root.answerC = "Decentralized connectivity";
_root.answerD = "Centralized connectivity";
_root.correct = "A";
_root.explanation = "A lightweight access point connected to a port on the switch is considered to have direct connectivity.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 18 :
_root.question = "Power sourcing equipment delivers which of the following?";
_root.answerA = "RF power to the access point";
_root.answerB = "DC power to the end device";
_root.answerC = "RF power to an antenna";
_root.answerD = "DC power to an antenna";
_root.correct = "B";
_root.explanation = "PSE delivers DC power, not RF power. The DC power is delivered to an end device such as an access point.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 19 :
_root.question = "Which access point mode involves connecting the access point to a distribution system for user access to the LAN?";
_root.answerA = "Bridge only mode";
_root.answerB = "Repeater only mode";
_root.answerC = "Root access point mode";
_root.answerD = "Access mode";
_root.correct = "C";
_root.explanation = "Root access point is the default mode in most cases. An access point in root access point mode allows users to connect to the network.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 20 :
_root.question = "Which of the following are midspan PoE devices? (Choose 2.)";
_root.answerA = "Single port injectors";
_root.answerB = "Multiport injectors";
_root.answerC = "Endpoint injectors";
_root.answerD = "Endspan injectors";
_root.correct = "AB";
_root.explanation = "Single port and multiport injectors combine power and data in the same cable. Endpoint power is out of the switch port. There is no such thing as an endspan injector.";
_root.figure_flag = "False";
_root.question_type = "4MC";
break;

	}
		
	QCounter.QCurrent.text = cur;
}

initialize();


//Change the following question numbers to the indicated question type!
//1. 5MC
//2. 4R
//3. 3R
//4. 4MC
//5. 5MC
//6. 5MC
//7. 2R
//8. 4R
//9. 4R
//10. 4R
//11. 7R
//12. 5MC
//13. 2R
//14. 7MC
//15. 5MC
//16. 4R
//17. 4R
//18. 4R
//19. 4R
//20. 4MC





//